Skip to content

Added Wasi2Configuration #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

martindevans
Copy link
Contributor

Added Wasi2Configuration which mirrors WasiConfiguration for WASI preview2.

Copy link
Contributor

@jsturtevant jsturtevant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kpreisser @BasGeertsema want to give a review?

using var store = new Store(engine);

var config = new Wasi2Configuration();
config.WithInheritedStandardInput();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to not test the other configs?

Copy link
Contributor Author

@martindevans martindevans Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a look at adding some more tests later today

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added some more coverage (just calling other WithInheritedX methods).

I'm not really happy about these tests though - they don't actually assert anything!

Ideally I guess we'd need a WASI2.wat test file that reads some input, logs some out and logs some error output. Then we could assert that all of that is written to the correct outputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants